//package com.example.spring_mysql.configuration
//
////import cn.dev33.satoken.thymeleaf.dialect.SaTokenDialect
//import com.example.spring_mysql.interceptor.LoggingInterceptor
//import org.springframework.beans.factory.annotation.Autowired
//import org.springframework.context.annotation.Bean
//import org.springframework.context.annotation.Configuration
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
//
//
//@Configuration
//class WebConfig : WebMvcConfigurer {
//    @Autowired
//    lateinit var loggingInterceptor: LoggingInterceptor
//
////    @Autowired
////    lateinit var loggingInterceptor: LoggingInterceptor
//
//    override fun addInterceptors(registry: InterceptorRegistry) {
//        registry.addInterceptor(loggingInterceptor)
//            .addPathPatterns("/**") // 拦截所有请求
//    }
//}
